package com.zzyl.common;

import com.baidubce.qianfan.Qianfan;
import com.baidubce.qianfan.core.auth.Auth;
import com.baidubce.qianfan.model.chat.ChatResponse;

/**
 * @version 1.0
 * @description 说明
 * @package com.zzyl.common
 */
public class QianFanDemo {
    public static void main(String[] args) {
        Qianfan qianfan = new Qianfan(Auth.TYPE_OAUTH, "6BWJnQ51kfrsKgkE6ps846ix", "XyN66kiiT69XThewv30sNG2dtf0eivVE");
        ChatResponse response = qianfan.chatCompletion()
            .model("ERNIE-4.0-8K-Preview")
            .addMessage("user", "请评价一下火影主播coke")
            .temperature(0.8)
            .responseFormat("json_object")
            .execute();
        System.out.println(response.getResult());

    }
}
